import React from 'react'
import Appson from '../page2/appson'
import {useState} from "react"
function App() {
    let [flag,setFlag] = useState(true)
    let changeFlag = () => {
          setFlag(!flag)
    }
  return (
    <div>
        <button onClick={()=>{changeFlag()}}>点击我去修改flag</button>
        {
            flag ?  <Appson></Appson> :"暂无数据"
        }
      
    </div>
  )
}

export default App